/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ASAExpr;

import exception.DivisionByZeroException;
import exception.VariableNonDeclareeException;

/**
 *
 * @author FM & KB
 */
public class ASAExprUnaireNegatif extends ASAExpr {

    private ASAExpr e1;
    
    public ASAExprUnaireNegatif(ASAExpr e1){
        this.e1 = e1;
    }
    
    @Override
    public ASAExpr getExpr1() {
        return e1;
    }

    @Override
    public ASAExpr getExpr2() {
        return null;
    }
    
    @Override
    public int evalue() throws VariableNonDeclareeException, DivisionByZeroException {
        return e1.evalue() * -1;
    }

    @Override
    public String getLabelExplorateur() {
        return "MOINS_UNAIRE";
    }
}
